package com.zscbw.test;

import java.lang.reflect.Field;
import java.lang.reflect.Modifier;

public class Field1 {
	private double d;
	public static final int i = 37;
	String s = "testing";
	public static void main(String[] args) {
		try {
			Class<?> cls = Class.forName("com.zscbw.test.Field1");
			Field[] fields = cls.getDeclaredFields();
			for (int i = 0; i < fields.length ; i++) {
				Field f = fields[i];
				System.out.println("name : " + f.getName());
				System.out.println("decl class : " + f.getDeclaringClass());
				System.out.println("type : " + f.getType());
				int mod = f.getModifiers();
				System.out.println("modifiers : " + Modifier.toString(mod));
				System.out.println("-------------------------!");
			}
		} catch (ClassNotFoundException e) {
			throw new RuntimeException(e);
		}
	}
}
